package com.patent.domain.po;

import java.util.Date;

public class ChangeDescriptionData {
    private Integer id;

    private Integer patentId;

    private Date date;

    private String changedItem;

    private String beforeChange;

    private String afterChange;

    public Integer getId() {
        return id;
    }

    public void setId(Integer id) {
        this.id = id;
    }

    public Integer getPatentId() {
        return patentId;
    }

    public void setPatentId(Integer patentId) {
        this.patentId = patentId;
    }

    public Date getDate() {
        return date;
    }

    public void setDate(Date date) {
        this.date = date;
    }

    public String getChangedItem() {
        return changedItem;
    }

    public void setChangedItem(String changedItem) {
        this.changedItem = changedItem == null ? null : changedItem.trim();
    }

    public String getBeforeChange() {
        return beforeChange;
    }

    public void setBeforeChange(String beforeChange) {
        this.beforeChange = beforeChange == null ? null : beforeChange.trim();
    }

    public String getAfterChange() {
        return afterChange;
    }

    public void setAfterChange(String afterChange) {
        this.afterChange = afterChange == null ? null : afterChange.trim();
    }

    @Override
    public boolean equals(Object that) {
        if (this == that) {
            return true;
        }
        if (that == null) {
            return false;
        }
        if (getClass() != that.getClass()) {
            return false;
        }
        ChangeDescriptionData other = (ChangeDescriptionData) that;
        return (this.getId() == null ? other.getId() == null : this.getId().equals(other.getId()))
            && (this.getPatentId() == null ? other.getPatentId() == null : this.getPatentId().equals(other.getPatentId()))
            && (this.getDate() == null ? other.getDate() == null : this.getDate().equals(other.getDate()))
            && (this.getChangedItem() == null ? other.getChangedItem() == null : this.getChangedItem().equals(other.getChangedItem()))
            && (this.getBeforeChange() == null ? other.getBeforeChange() == null : this.getBeforeChange().equals(other.getBeforeChange()))
            && (this.getAfterChange() == null ? other.getAfterChange() == null : this.getAfterChange().equals(other.getAfterChange()));
    }

    @Override
    public int hashCode() {
        final int prime = 31;
        int result = 1;
        result = prime * result + ((getId() == null) ? 0 : getId().hashCode());
        result = prime * result + ((getPatentId() == null) ? 0 : getPatentId().hashCode());
        result = prime * result + ((getDate() == null) ? 0 : getDate().hashCode());
        result = prime * result + ((getChangedItem() == null) ? 0 : getChangedItem().hashCode());
        result = prime * result + ((getBeforeChange() == null) ? 0 : getBeforeChange().hashCode());
        result = prime * result + ((getAfterChange() == null) ? 0 : getAfterChange().hashCode());
        return result;
    }
}